﻿<!--File Info Header
________________________________________________________________________________________

  Copyright (C) 2011 Jason Zhang, eagleboost@msn.com

  * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 
  * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.

________________________________________________________________________________________*/
-->

<Window x:Class="NumericUpDownApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="clr-namespace:EagleBoost.Wpf.Presentation.Controls.NumericUpDown;assembly=EagleBoost.Wpf.Presentation" 
        Title="MainWindow" SizeToContent="Height" Width="350">
  <Grid Margin="10">
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto"/>
      <ColumnDefinition/>
    </Grid.ColumnDefinitions>
    <Label Grid.Row="0" Grid.Column="0" Content="_Value:" Target="{Binding ElementName=doubleUpDown}"/>
    <controls:NumericUpDown Grid.Row="0" Grid.Column="1" Name="doubleUpDown"
                            Value="{Binding Value, ElementName=syncValueUpDown, Mode=TwoWay}"
                            DecimalPlace="{Binding Value, ElementName=decimalUpDown}"
                            SmallChange="{Binding Value, ElementName=smallChangeUpDown}"
                            LargeChange="{Binding Value, ElementName=largeChangeUpDown}"/>
    <Label Grid.Row="1" Grid.Column="0" Content="S_ynchronized:" Target="{Binding ElementName=syncValueUpDown}"/>
    <controls:NumericUpDown Grid.Row="1" Grid.Column="1" Name="syncValueUpDown" Value="10"
                            DecimalPlace="{Binding Value, ElementName=decimalUpDown}"
                            SmallChange="{Binding Value, ElementName=smallChangeUpDown}"
                            LargeChange="{Binding Value, ElementName=largeChangeUpDown}"/>
    <Grid Grid.Row="2" Grid.Column="1">
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <Label Grid.Row="0" Grid.Column="0" Content="D_ecimal:" Target="{Binding ElementName=decimalUpDown}"/>
      <controls:NumericUpDown Grid.Row="0" Grid.Column="1" Name="decimalUpDown" Value="2" Minimum="-2" Maximum="10"/>
      <Label Grid.Row="1" Grid.Column="0" Content="_Small Change:" Target="{Binding ElementName=smallChangeUpDown}"/>
      <controls:NumericUpDown Grid.Row="1" Grid.Column="1" Name="smallChangeUpDown" Value="1"/>
      <Label Grid.Row="2" Grid.Column="0" Content="_Large Change:" Target="{Binding ElementName=largeChangeUpDown}"/>
      <controls:NumericUpDown Grid.Row="2" Grid.Column="1" Name="largeChangeUpDown" Value="20"/>
    </Grid>
  </Grid>
</Window>
